<template>
  <div class="card-list-box">
    <ul class="clearfix flex1">
      <li
        :ref="'li'+index"
        v-for="(item,index) in data"
        :key="item.baseId"
      >
        <card-list-item >

        </card-list-item>
      </li>
    </ul>
  </div>
</template>

<script>

import cardListItem from '@/components/CardList/cardListItem.vue'

export default {
  name: 'index',
  components: { cardListItem },
  props: {
    data: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  data() {
    return {
      checkedList: []
    }
  },
  methods: {
    handleSelect(itemId) {
      let index = this.checkedList.indexOf(itemId)
      if (index == -1) {
        this.checkedList.push(itemId)
      } else {
        this.checkedList.splice(index, 1)
      }
      this.$emit('selectionChange', this.checkedList)
    }
  }
}
</script>

<style scoped>

</style>
